//package com.xjh.controller;
//
//import com.xjh.utils.common.ResponseObj;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.security.oauth2.common.OAuth2AccessToken;
//import org.springframework.security.oauth2.provider.endpoint.TokenEndpoint;
//import org.springframework.web.HttpRequestMethodNotSupportedException;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestMethod;
//import org.springframework.web.bind.annotation.RequestParam;
//import org.springframework.web.bind.annotation.RestController;
//
//import java.security.Principal;
//import java.util.Map;
//
///**
// * @author XuJianHua
// * @version 1.0
// * @company 湖南安第斯信息科技有限公司, 版权所有
// * @date 2022/7/13 18:44
// */
//@RestController
//@RequestMapping("/oauth")
//@Slf4j
//public class AuthController {
//    @Autowired
//    private TokenEndpoint tokenEndpoint;
//
//    /**
//     * Oauth2登录认证
//     */
//    @RequestMapping(value = "/token", method = RequestMethod.POST)
//    public ResponseObj postAccessToken(Principal principal, @RequestParam Map<String, String> parameters) throws HttpRequestMethodNotSupportedException {
//        OAuth2AccessToken oAuth2AccessToken = tokenEndpoint.postAccessToken(principal, parameters).getBody();
//        ResponseObj responseObj = new ResponseObj();
//        return responseObj.ok("666");
//    }
//}
//
//


